Fault Restoration of Six-Axis Force/Torque Sensor Based on Optimized Back Propagation Networks

Six-axis force/torque sensors are widely installed in manipulators to help researchers achieve closed-loop control. When manipulators work in comic space and deep sea, the adverse ambient environment will cause various degrees of damage to F/T sensors. If the disability of one or two dimensions is restored by self-restoration methods, the robustness and practicality of F/T sensors can be considerably enhanced. The coupling effect is an important characteristic of multi-axis F/T sensors, which implies that all dimensions of F/T sensors will influence each other. We can use this phenomenon to speculate the broken dimension by other regular dimensions. Back propagation neural network (BPNN) is a classical feedforward neural network, which consists of several layers and adopts the back-propagation algorithm to train networks. Hyperparameters of BPNN cannot be updated by training, but they impact the network performance directly. Hence, the particle swarm optimization (PSO) algorithm is adopted to tune the hyperparameters of BPNN. In this work, each dimension of a six-axis F/T sensor is regarded as an element in the input vector, and the relationships among six dimensions can be obtained using optimized BPNN. The average MSE of restoring one dimension and two dimensions over the testing data is 1.1693×10−5 and 3.4205×10−5, respectively. Furthermore, the average quote error of one restored dimension and two restored dimensions are 8.800×10−3 and 8.200×10−3, respectively. The analysis of experimental results illustrates that the proposed fault restoration method based on PSO-BPNN is viable and practical. The F/T sensor restored using the proposed method can reach the original measurement precision.


Introduction
Multi-axis F/T sensors play an important role in high-end manufacturing fields. For example, F/T sensors can provide feedback for researchers to achieve fine grab in deep sea and the remote control in comic space [1][2][3]. However, high pressure under deep sea and high vacuum, high-low temperatures in comic space and other adverse factors will cause damage to F/T sensors [4]. It can be helpful and economical if the damaged F/T sensors can be restored rather than replaced when the damage is not fatal. Therefore, fault restoration is meaningful and necessary for multi-axis F/T sensors.
A six-axis strain gauge sensor is taken as an example of multi-axis F/T sensors in this paper, and the proposed method can be applied to other types of multi-axis F/T sensors with minor modifications. An elastic body and several strain gauges constitute the six-axis F/T strain gauge sensor, and every four strain gauges (two strain gauges for semi-bridge) pasted on an elastic body compose a Wheatstone bridge. Because all strain gauges are pasted on the same elastic body, applying a load in one direction will induce deformation not only on the corresponding dimension, but also on other dimensions, which is called coupling. The coupling effect will reduce the measurement precision of six-axis F/T sensors, and scholars have proposed numerous decoupling methods to eliminate the effects of coupling. Song et al. [5] proposed a robust static decoupling algorithm for 3-axis force sensors based on ε-SVR, and Liang et al. [6] proposed a decoupling method based on parallel voltage extreme learning machine (PV-ELM) for six-axis F/M sensors. Nevertheless, if we make use of the coupling effect and find the correlations among all dimensions, it is feasible to achieve restoration of slight damages of F/T sensors.
The key to fault restoration for F/T sensors is to find out how the output of one dimension is affected by the loads from other dimensions. Mechanical analysis and finite element analysis (FEA) can reveal inherent correlations between dimensions. Niu et al. [7] analyzed the structure of a six-dimensional parallel-mechanism force sensor and proposed a new structure to minimize the coupling effect. Nevertheless, mechanical analysis and FEA are costly and demand too much prior knowledge. Machine learning has attracted much attention recently. Neural network is a major branch of machine learning, which is widely used for regression and classification in engineering, economics, and other fields [8,9].
Back propagation (BP) neural networks have simple structures and high efficiency, which makes them popular in fault detection and restoration [10][11][12][13]. BPNNs pass information through multiple hidden layers and calculate gradients of weights and biases by the back-propagation algorithm. Hyperparameters such as the counts of layers and the width of hidden layers will effect the convergence rate and performance of BPNN. Hyperparameters are normally selected by blind trails which are costly and not satisfying. Particle swarm optimization is a famous multi-objective optimization algorithm, and it is utilized for acquiring optimal solutions in math and engineering [14][15][16][17]. Lin et al. [18] proposed an adaptive dissipative particle swarm optimization (ADPSO) algorithm, which is used to solve the resource balancing optimization problem for different network-plans scales.
In this work, we proposed a fault restoration method based on the particle swarm optimization (PSO) algorithm optimizing back propagation neural networks (BPNN). After that, we conducted a coupling experiment to research the impact of coupling effects and obtain the transfer expression for the six-axis F/T sensor. Finally, some simulations are conducted to evaluate the proposed method. The rest of this paper is organized as follows: the concept and algorithm of BPNN and the PSO algorithm are briefly reviewed, then a novel fault restoration method for six-axis F/T sensors is proposed based on PSO-BPNN. Experiments including sensor calibration and model training are presented. Finally, the performance of the proposed method is discussed through the analysis of experiment results.

Back Propagation Neural Networks
A BP neural network consists of one input layer, one output layer and several hidden layers. Each hidden layer owns an activation function, which calculates responses of layer nodes. Assuming X = {x 1 , x 2 , · · · , x m } T is the input vector, Y = {y 1 , y 2 , · · · , y n } T is the output vector, the typical structure of BPNN is shown in Figure 1.

Forward Propagation
The input data flows through a series of hidden layers in turn, and the output of hidden layers can be expressed as follows: where h = {1, 2, · · · , H}is the index of layer, W h ∈ R n×l and b h ∈ R l are the weight matrix and the bias vector of h'th layer, respectively, f (·) the nonlinear activate function.
The model output Y can be obtained by the same formula in (1), except that the output activation function is set to linear function: where V ∈ R m×n and b o ∈ R n are the weight matrix and bias vector of the output layer.

Backward Propagation
The training principle of BPNN is to reduce the total errors in the dataset. Mean square error (MSE) is a common criterion for regression tasks, which is formulated as follows: BPNN adopts the back-propagation algorithm to train the network, which updates weights and biases along the gradient directions.

Repetition and Termination
The progress of forward and backward propagation are repeated iteratively, and the training terminates when it reaches the maximum iteration or the target error. The maximum iteration is essential for model training, and a suitable maximum iteration should be selected for keeping balance between under-fitting and over-fitting.

Particle Swarm Optimization
Meta-heuristic algorithms have attracted a lot of attention in many fields, such as mathematics, cyber-security, and the Internet of Things (IoT) [19,20]. These algorithms have three attractive characteristics: simplicity, flexibility, and the ability to avoid local optima. The particle swarm optimization algorithm is a meta-heuristic optimization algorithm, and it is inspired by crowd behavior observed in insects, fishes and birds. Assuming , v i2 , · · · , v im ) are the current position, and the speed of iteration i, respectively. p i = (p i1 , p i2 , · · · , p im ) presents the optimal position and p * i = p * i1 , p * i2 , · · · , p * im is the global optimal position of each particle in iteration i. The basic evolution expression can be formulated as follows: where i = {1, 2, · · · , n} is the index of particle, d = {1, 2, · · · , D} is the dimension index; t = {1, 2, · · · , T} indicates the current generation and w is inertia factor; and r 1 ,r 2 are random variables in the range of [0, 1]. The inertia factor w is negative. The bigger w means the better global search ability, while the smaller w means the better local search ability. Generally, dynamic strategies are adopted to adapt the inertia factor w to the searching progress, which is shown as follows: where w max and w min are the maximum and minimum inertia factor, respectively. T indicates the maximum iteration. The pseudo code of PSO with dynamic strategy is shown in Algorithm 1.

Algorithm 1: Dynamic Particle Swarm Optimization
Inputs: The count of dimensions D, the count of particles N, the maximum iteration T, the boundary of inertia factor [w min , w max ]. Outputs: The optimal position of all dimensions. Process: 1. for each particle i 2.
Initialize velocity v i and position Evaluate the fitness; 4. end for 5. p * = min(p i ); 6. while t ≤ T 7.
for i = 1 to N 8.
Evaluate the fitness of particle i; end for 16. end while 17. return p *

Fault Restoration Based on PSO-BPNN
The target for fault restoration is predicting the output of the broken dimension based on the correlations among other dimensions. Considering the complex of mutual impacts of coupling among dimensions, two schemes are assumed in this work: one arbitrary broken dimension restored by the other five dimensions and two arbitrary broken dimensions restored by the other four dimensions.
This chapter will describe how to apply the BPNN for restoring the broken dimension in the aforesaid two schemes and tuning hyperparameters of BPNN by the PSO algorithm. Lastly, the flowchart of the proposed method is presented.

Dataset Preparation
Assuming the input vectors are X i = x 1 i , x 2 i , · · · , x m i T , and the output vectors are The basic BP network consists of one input layer, one output layer and one hidden layer. Besides, the amount of hidden layer elements is selected by experience. In this work, the PSO algorithm is utilized to obtain the optimal counts of hidden layers and elements in each hidden layer. The counts of elements in input and output layers are decided according to Section 3.1.

Activation Function
Activation function g(z) for all hidden layers is the hyperbolic tangent activation function, which is formulated as follows: Additionally, the linear function is selected for the output layers, which is shown as the following equation: g(z) = z.

Cost Function
The BP networks use a cost function to calculate the error between predicted values and real values. Mean square error is selected to be the cost function in this work, which is suitable for regression task.

Maximum Iteration
The BP networks will update weights and bias during training progress iteratively. Early Stopping, a type of parameter fine tuning strategy, calculates the accuracy of a model at the end of each cycle and stop training when the accuracy is no longer increasing. Hence, appropriate iterations can benefit to alleviate the under-fitting or over-fitting problems. The PSO algorithm is utilized to search for the optimal target iteration, which enhances the model performance.

Model Optimization by PSO
This section will illustrate how PSO is applied to optimize hyperparameters for the BPNN. As shown in Section 3.2, there are three hyperparameters to be optimized in BPNN, including the counts of hidden layers, the counts of neurons in each hidden layer, and the maximum iterations.

Searching Space of Parameters
Considering the balance between model complexity and performance, we selected an approximate searching range for parameters, which is listed in Table 1.

PSO Configurations
After a large number of experiments, the particle count of PSO was set to 50. The target iteration of PSO was set to 300 according to the model precision. The update strategy of inertia factor w is linear decreasing, as shown in (6).
The implementation process of the BPNN optimized using the PSO algorithm is illustrated in Figure 2:

Experiments
A six-axis F/T sensor produced by the Institute of Intelligent Machines (IIM), Chinese Academy of Sciences (CAS), is utilized for experiments in this section. A unique double E-shape elastic body and several strain gauges constitute this six-axis F/T sensor [21]. The prototype and measurement circuit of the six-axis F/T sensor is shown in Figure 3, and the rated ranges of all dimensions are shown in Table 2. The experiment was programmed using MATLAB software and conducted on a PC which contains 3.6 GHz CPU and NVIDIA RTX 3070 GPU.

Coupling Experiments
A coupling experiment was conducted to study the coupling effects among dimensions on the F/T sensor, and the experimental data were gathered for sensor calibration and model training. The coupling experiment is similar to the sensor calibration, which investigates the coupling output of all dimensions while the single dimension is loaded. Assuming U = [u 1 , u 2 , · · · , u 6 ] T represents the vector of voltage outputs of six dimensions, and L = [Fx, Fy, Fz, Mx, My, Mz] indicates the measured load vector.
The main procedures of coupling and calibrating for six-axis F/T sensors apply a series of specific loads, which increase from minimum to maximum rated ranges with a certain step. These procedures were repeated three times in this coupling experiment, and the load vector L and voltage vector U were recorded at sample points for processing. The configuration of sample points is shown in Table 3, and the temperature and humidity of environment are 25 • C and 60%, respectively.

Dimensions Load Points Units
Fx 0, ±200, ±400, ±600, ±800, ±1000 N Fy 0, ±200, ±400, ±600, ±800, ±1000 N Fz 0, ±200, ±400, ±600, ±800, ±1000 Calibrating for F/T sensors aims to build the transfer expression between loads and output voltages, and it can be formulated by the following equation: where W is a calibration matrix, which consists of weights between loads and output voltages, and B is bias vector. Least Square (LS) algorithm is commonly utilized to calculate the calibration matrix W and bias vector B. W, B obtained from LS in this calibration experiment are shown as follows: The transfer expression is obtained by substituting W and B into (7).

Coupling
Coupling effects can be illustrated by taking the load on one dimension as an independent variable, while the output voltages of all dimensions are dependent variables. As shown in Figure 4, coupling effects are observed between some dimension pairs. For example, the output voltages of dimension My have positive correlation with the loads on dimension Fx, the output voltages of dimension Fy have a negative correlation with the loads on dimension Mx. However, the loads exerted on dimension Fz and My cause minor effects on other dimensions, which means the structures of dimension Fz and My are somewhat independent of other dimensions. Based on the above analysis, coupling effects exist among dimensions of the six-axis F/T sensor, and we can use this phenomenon to restore one and two dimensions from damages. Besides, the effects of restoration are relative to the coupling level of dimensions.

Model Training
The data gathered in the coupling experiment contains the output of six dimensions. Since any dimension can be damaged in work, we assumed that one dimension was damaged in scheme 1 and restored it, then repeated this progress for all dimensions in turn. Similarly, we assumed that two dimensions were broken in scheme 2 and restored them by turns. Thus, there will be six combinations in scheme 1 and fifteen combinations in scheme 2.
To evaluate the effect of the proposed method, we take a basic BP network as a comparison, which consists of an input layer, an output layer, and two hidden layers.

Experiment Result and Analysis
After the restoration model is well trained, restoration experiments are carried out to evaluate the performance of the proposed method. Figure 5 shows how the trained model works in the measurement process. The testing errors indicated by the MSE of scheme 1 and scheme 2 are shown in Table 4 and Table 5, respectively. Besides, the convergence curve of training for dimension Fz is taken for a representative, which is shown in Figure 6.
Expect for the MSE, we calculated the quote errors (QE) between the measurement outputs of the normal six-axis F/T sensor and restored one. The QE divides the full scale of the factor, which can make it easier to compare the performance of dimensions whose rated ranges are different. The quote errors can be calculate using (10).
where y and y indicate the restored measurement vector and original measurement vector, respectively. D is the training set or testing set, and y FS is the measurement range of the corresponding dimension. The quote errors of scheme 1 and scheme 2 in the training and testing sets are shown in Table 6 and Table 7, respectively. The measurement ranges are listed in Table 2.     As the experiment results show in Tables 4 and 5, the maximum and average testing errors of one dimension restoration are 5.553 × 10 −5 and 1.1693 × 10 −5 . The maximum and average testing MSEs of two dimensions restoration are 1.218 × 10 −4 and 3.4205 × 10 −5 . The testing MSEs show that the PSO-BPNN can accurately represent the correlations between dimensions in most conditions, and it is possible to restore the output of the damaged dimension with the remaining dimensions. The maximum and average quote errors of one dimension are 3.600 × 10 −2 and 8.800 × 10 −3 . The maximum and average quote errors of two dimensions are 2.42 × 10 −2 and 8.200 × 10 −3 . The quote errors in testing show that the measurement output of the restored dimensions can reach the original precision class, which means the proposed restoration method is feasible and satisfactory.
In addition, the average fitness of BPNN during training Fz is taken to illustrate the convergence characteristic of PSO, and the convergence curve is shown in Figure 6. As can be seen from Figure 6, the fitness continued to decrease before reaching the target iterations, which means that the PSO algorithm has good global search ability and is not easy to trap in local optima.

Conclusions
Multi-axis force/torque sensors are commonly deployed in robotics and industry. Due to the bad ambient conditions, multi-axis F/T sensors will be occasionally damaged, which is fatal to the control system. If one or two dimensions get damaged, it is costly and troublesome to replace the entire F/T sensor. Hence, fault restoration is meaningful and necessary for multi-axis F/T sensors.
Back propagation neural networks are popular for their simpleness and good performance. In this work, we adopted BPNN to represent the correlation between dimensions and build restoration models for damaged dimensions. Hyperparameters are essential for BPNN, and searching for good hyperparameters is low effective. The PSO algorithm is utilized to determine the optimal structure for BPNN in the proposed model. Moreover, a coupling experiment was conducted to assess the coupling effects of six-axis F/T sensors and provide data for model training.
The results of fault restoration experiments illustrated that the PSO-BPNN is feasible and suitable for fault restoration, and the PSO algorithm can provide optimal hyperparameters to improve the performance of BPNN. Multi-axis F/T sensors, which embed the fault restoration method, are more reliable and robust when working in the bad environment.
The proposed method performs well in fault restoration, but the model does not take into account the indirect coupling effect between dimensions. In future research, we will explore the inner mechanism of coupling effects and detect damage to multi-axis F/T sensors.